package com.itheima.reggie_auto.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie_auto.dto.DishDto;
import com.itheima.reggie_auto.entity.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p>
 * 菜品管理 Mapper 接口
 * </p>
 *
 * @author 刘少宽
 * @since 2022-09-23
 */
@Mapper
public interface DishMapper extends BaseMapper<Dish> {


    // public abstract long selectCount(String name);
    public abstract Page<DishDto> selectByPage(Page<DishDto> page,@RequestParam("name") String name);

    public abstract int insertDish(Dish dish);

    DishDto getById(Long id);
}
